<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>开门</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    body{
      width: 100%;
      height: 100%;
      /*padding-top: 500px;*/
    }
    .open{
      width: 200px;
      height: 200px;
      border-radius: 50%;
      line-height: 200px;
      text-align: center;
      background-color: #ff9900;
      margin: auto;
      margin-top: 600px;
      font-size: 50px;
    }
  </style>
</head>
<body>
  <div class="open" onclick="seveHandle()">开门</div>
  <script src="./js/vendor/jquery/1.11.3/jquery.min.js"></script>
  <script src="./js/lib/urlGet.js"></script>
  <script src="./js/lib/config.js?v0.0.1"></script>
  <script>
    function seveHandle(){
     $.ajax({
         url:configApi('/h5/open-door-test'),
         dataType:'json',
         type:'post',
     }).done(function (res) {
         window.location.href = './index.html'
//         alert(res.message)
//         if(res.success){
//             window.location.href = './index.html'
//         }else {
//             alert('开门失败')
//         }
     })
    }
  </script>
</body>
</html>
